package com.plian.system.mapper.fr.bulletin;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.plian.system.entity.fr.bulletin.NewBulletin;
import com.plian.system.vo.fr.bulletin.BulletinSummaryDetailVO;
import com.plian.system.vo.fr.bulletin.NewBulletinVO;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * Mapper 接口
 *
 * @author gangan
 * @since 2021-02-02
 */
public interface BulletinMapper extends BaseMapper<NewBulletin> {


    /**
     * 获取合并明细
     * @param amountName
     * @param typeCode
     * @param bulletinId
     * @return
     */
    List<BulletinSummaryDetailVO> getSummaryDetail(@Param("amountName") String amountName,
                                                   @Param("typeCode") String typeCode,
                                                   @Param("bulletinId") String bulletinId);

    /**
     * 获取可合并子节点
     * @param reportTime
     * @param orgIds
     * @return
     */
    List<NewBulletinVO> summaryChildList(@Param("reportTime") String reportTime,
                                         @Param("orgIds") List<String> orgIds);

    /**
     * 根据年份获取单表数据
     * @param year
     * @param orgId
     * @return
     */
    List<NewBulletinVO> getSingleListByYear(@Param("year") String year,
                                        @Param("orgId") String orgId);

    /**
     * 根据年份获取单表数据
     * @param year
     * @param orgId
     * @return
     */
    List<NewBulletinVO> getGroupListByYear(@Param("year") String year,
                                       @Param("orgId") String orgId);

    /**
     * 获取单个单户表
     * @param newBulletinVO
     * @return
     */
    NewBulletinVO getSingleOneByParam(NewBulletinVO newBulletinVO);

    /**
     * 获取单个合并表
     * @param newBulletinVO
     * @return
     */
    NewBulletinVO getGroupOneByParam(NewBulletinVO newBulletinVO);
}
